import request from "./request"

// 获取评论
export function getComments(data){
    return request({
        url: '/echo/comment/list',
        method: 'post',
        data
    })
}

// 发布评论
export function postComment(data){
    return request({
        url: '/echo/comment/post',
        data,
        method: 'post',
        headers: {
            "Authorization":localStorage.getItem("Authorization")
        }
    })
}

// 删除评论
export function deleteCommentById(id){
    return request({
        url: '/echo/comment/delete/'+id,
        method: 'get',
        headers: {
            "Authorization":localStorage.getItem("Authorization")
        }
    })
}